import { lazy } from 'react';
import loadable from '../utils/loadable';
export const homeRoutes = [
  {
    path: '/login',
    component: lazy(() => import('@/pages/login')),
    title: '登录'
  },
  {
    path: '/404',
    component: lazy(() => import('@/components/other/404')),
    title: '404'
  }
];

export const adminRoutes = [
  {
    path: '/admin/index',
    component: lazy(() => import('@/pages/admin/index')),
    title: '后台主页',
    isShow: true
  },
  {
    path: '/admin/fatherson',
    component: lazy(() => import('@/pages/admin/fatherAndSon')),
    title: '父子传值',
    isShow: true
  },
  {
    path: '/admin/redux',
    component: lazy(() => import('@/pages/admin/useRedux')),
    title: 'redux传值',
    isShow: true
  },
  {
    path: '/admin/redux-toolkit',
    component: lazy(() => import('@/pages/admin/useReduxToolkit')),
    title: 'redux-toolkit传值',
    isShow: true
  },
  {
    path: '/admin/mobx',
    component: lazy(() => import('@/pages/admin/useMobx')),
    title: 'mobx传值',
    isShow: true
  },
  {
    path: '/admin/http',
    component: lazy(() => import('@/pages/admin/http')),
    title: '网络请求',
    isShow: true
  },
  {
    path: '/admin/hook/learn_1',
    component: lazy(() => import('@/pages/admin/hook/learn_1')),
    title: 'hook练习',
    isShow: true
  },
  {
    path: '/admin/ref',
    component: lazy(() => import('@/pages/admin/ref')),
    title: 'Ref的使用'
  },
  {
    path: '/admin/extend/theme',
    component: lazy(() => import('@/pages/admin/extend/theme')),
    title: '自定义换肤'
  },
  {
    path: '/admin/extend/lazyload-img',
    component: lazy(() => import('@/pages/admin/extend/lazyloadImg')),
    title: '图片懒加载'
  },
  {
    path: '/admin/extend/wangeditor',
    component: lazy(() => import('@/pages/admin/extend/wangeditor')),
    title: '富文本编辑器'
  },
  {
    path: '/admin/extend/export',
    component: lazy(() => import('@/pages/admin/extend/exportExcel')),
    title: '导出excel'
  },
  {
    path: '/admin/temp',
    component: lazy(() => import('@/pages/admin/extend/temp')),
    title: '备用'
  },
  {
    path: '/admin/list',
    component: lazy(() => import('@/pages/admin/list')),
    title: '列表分页',
    isShow: true
  },
  {
    path: '/admin/dashbored',
    component: lazy(() => import('@/pages/admin/dashbored')),
    title: '看板',
    isShow: true
  },
  {
    path: '/admin/test',
    component: lazy(() => import('@/pages/admin/test/test')),
    title: '测试功能页',
    isShow: true
  }
];
export const userRoutes = [
  {
    path: '/user/index',
    component: lazy(() => import('@/pages/home/index')),
    title: '用户主页面'
  },
  {
    path: '/user/button',
    component: lazy(() => import('@/pages/home/home')),
    title: '子页面'
  }
];
